<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jstl/core"
                xmlns:sf="http://www.springframework.org/tags/faces"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:spring="http://www.springframework.org/tags"
                template="../../../layout/Template.xhtml">

    <ui:define name="menu">
        <ui:include src="${user.menu}"/>
    </ui:define>

    <ui:define name="title">
        <h:outputText value="Inscription Pedagogique"/>
    </ui:define>

    <ui:define name="content">
        <h:panelGrid id="readLessonGrid" columns="2">
            <h:outputText value="#{resourceBundle.readRegistrationStudent} : "/>
            <h:outputText value="#{flowScope.currentRegistration.student}"/>

            <h:outputText value="#{resourceBundle.readRegistrationTraining} : "/>
            <h:outputText value="#{flowScope.currentRegistration.training}"/>
            <h:outputText value="#{resourceBundle.readRegistrationCourse} : "/>
            <h:outputText value="#{flowScope.currentRegistration.course}"/>
            <h:outputText value="#{resourceBundle.readRegistrationStartTime} : "/>
            <h:outputText value="#{flowScope.currentRegistration.startTime}">
                <f:convertDateTime pattern="MM/yyyy" type="time"/>
            </h:outputText>

            <h:outputText value="#{resourceBundle.readRegistrationEndTime} : "/>
            <h:outputText value="#{flowScope.currentRegistration.endTime}">
                <f:convertDateTime pattern="MM/yyyy" type="time"/>
            </h:outputText>
        </h:panelGrid>
        <rich:dataTable value="#{flowScope.listUnit}" var="unitDisplayed"
                        border="1" cellspacing="4" width="100%" id="unitDataTable" rows="10">

            <f:facet name="header">
                <h:outputText value="#{resourceBundle.listUnitFormHeader}"/>
            </f:facet>
            <rich:column>
                <f:facet name="header">
                    <h:outputText value="#{resourceBundle.listUnitFormName}"/>
                </f:facet>
                <!-- <a4j:commandLink value="#{unitDisplayed.name}" action="readUnit"/>  -->
                <h:outputText value="#{unitDisplayed.name}"/>
            </rich:column>
            <rich:column style="text-align:center">
                <f:facet name="header">
                    <h:outputText value="#{resourceBundle.listUnitFormCredit}"/>
                </f:facet>
                <h:outputText value="#{unitDisplayed.credit}"/>
            </rich:column>
        </rich:dataTable>
    </ui:define>

</ui:composition>